/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tk.eigh.ksvg.component.structure;

import ksvg.core.SVGStructural;
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFComponent;
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFProperty;

/**
 * TODO Standalone Document Component
 * @author nt
 */
@JSFComponent(name = "svg:Document",
type = "tk.eigh.svg.Document",
family = "structure.Container",
clazz = "ksvg.structure.Document",
tagClass = "ksvg.tags.structure.DocumentTag",
defaultRendererType = "structure.SVGDocumentRenderer")
public abstract class AbstractDocument extends SVGStructural
        implements _DocumentEvents{

    /**
     * Indicates the SVG language version to which this document fragment
     * conforms. In SVG 1.0 [SVG10], this attribute was fixed to the value
     * '1.0'. For SVG 1.1, the attribute should have the value '1.1'.
     */
    @JSFProperty(defaultValue = "1.1")
    public abstract String getVersion();

    /**
     * Describes the minimum SVG language profile that the author believes is
     * necessary to correctly render the content. The attribute does not specify
     * any processing restrictions; It can be considered metadata. For example,
     * the value of the attribute could be used by an authoring tool to warn the
     * user when they are modifying the document beyond the scope of the
     * specified base profile. Each SVG profile should define the text that is
     * appropriate for this attribute. If the attribute is not specified, the
     * effect is as if a value of 'none' were specified.
     */
    @JSFProperty
    public abstract String getBaseProfile();

    //TODO interface for cordinates, width and height
    /**
     * The x-axis coordinate of the side of the rectangle which has the smaller
     * x-axis coordinate value in the current user coordinate system. If the
     * attribute is not specified, the effect is as if a value of "0" were
     * specified.
     */
    @JSFProperty(required = true)
    public abstract Integer getX();

    /**
     * The y-axis coordinate of the side of the rectangle which has the smaller
     * y-axis coordinate value in the current user coordinate system. If the
     * attribute is not specified, the effect is as if a value of "0" were
     * specified.
     */
    @JSFProperty(required = true)
    public abstract Integer getY();

    /**
     * The width of the rectangle. A negative value is an error (see Error
     * processing). A value of zero disables rendering of the element.
     */
    @JSFProperty(required = true)
    public abstract Integer getWidth();

    /**
     * The height of the rectangle. A negative value is an error (see Error
     * processing). A value of zero disables rendering of the element.
     */
    @JSFProperty(required = true)
    public abstract Integer getHeight();

    /**
     * See http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute. *
     * If the attribute is not specified, then the effect is as if a value of
     * 'xMidYMid meet' were specified.
     */
    @JSFProperty
    public abstract String getPreserveAspectRatio();

    /**
     * Identifies the default scripting language for the given SVG document
     * fragment. This attribute sets the default scripting language used to
     * process the value strings in event attributes. This language must be used
     * for all instances of script that do not specify their own scripting
     * language. The value content-type specifies a media type, per MIME Part
     * Two: Media Types [RFC2046]. The default value is 'application/ecmascript'
     * [RFC4329].
     */
    @JSFProperty
    public abstract String getContentScriptType();

    /**
     * Identifies the default style sheet language for the given document. That
     * language must then be used for all instances of style that do not specify
     * their own style sheet language, such as the ‘style’ attributes that are
     * available on many elements. The value content-type specifies a media
     * type, per MIME Part Two: Media Types [RFC2046]. The default value is
     * "text/css" [RFC2318].
     */
    @JSFProperty
    public abstract String getContentStyleType();

    /**
     * The outermost svg element in an SVG document fragment has attribute
     * ‘zoomAndPan’, which takes the possible values of disable and magnify,
     * with the default being magnify.
     *<br/>
     * If disable, the user agent shall disable any magnification and panning
     * controls and not allow the user to magnify or pan on the given document
     * fragment.
     *<br/>
     * If magnify, in environments that support user interactivity, the user
     * agent shall provide controls to allow the user to perform a "magnify"
     * operation on the document fragment.
     *<br/>
     * If a ‘zoomAndPan’ attribute is assigned to an inner ‘svg’ element, the
     * ‘zoomAndPan’ setting on the inner ‘svg’ element will have no effect on
     * the SVG user agent.
     */
    @JSFProperty
    public abstract String getZoomAndPan();

    /**
     * If an SVG document is likely to be referenced as a component of another
     * document, the author will often want to include a ‘viewBox’ attribute on
     * the outermost svg element of the referenced document. This attribute
     * provides a convenient way to design SVG documents to scale-to-fit into an
     * arbitrary viewport.
     */
    @JSFProperty
    public abstract String getViewBox();
}